<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SqlDataSourceSessionPage.aspx.cs" Inherits="SqlDataSourceSessionPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <div>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:RecruitVietnamDbConnectionString %>"
                OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT [UserID], [Email], [FirstName], [LastName], [Address] FROM [tblJSAccounts] WHERE ([City] = @City)">
                <SelectParameters>
                    <asp:SessionParameter Name="City" SessionField="City" Type="String" />
                </SelectParameters>
            </asp:SqlDataSource>
            &nbsp;</div>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="UserID"
            DataSourceID="SqlDataSource1">
            <Columns>
                <asp:BoundField DataField="UserID" HeaderText="UserID" InsertVisible="False" ReadOnly="True"
                    SortExpression="UserID" />
                <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
                <asp:BoundField DataField="FirstName" HeaderText="FirstName" SortExpression="FirstName" />
                <asp:BoundField DataField="LastName" HeaderText="LastName" SortExpression="LastName" />
                <asp:BoundField DataField="Address" HeaderText="Address" SortExpression="Address" />
            </Columns>
        </asp:GridView>
    
    </div>
    </form>
</body>
</html>
